<template>
  <div>
    <el-form inline label-width="70px" label-position="left">
      <el-form-item style="float: right;">
        <el-button type="primary" icon="el-icon-search" @click="loadTable">查询</el-button>
      </el-form-item>
    </el-form>
    <el-table
      v-loading="loading"
      :data="list"
      border
      :max-height="height"
    >
      <el-table-column label="ip" prop="ip" min-width="100px" />
      <el-table-column label="主机名称" prop="hostName" min-width="100px" />
      <el-table-column label="websocket状态" prop="websocketState" min-width="120px" />
      <el-table-column label="主机状态" prop="hostState" min-width="120px" />
    </el-table>
  </div>
</template>

<script>

import request from '@/utils/request'

export default {
  name: 'ipInfo',
  data() {
    return {
      loading: false,
      list: [],
      height: window.innerWidth > 1024 ? window.innerHeight - 246 : 420
    }
  },
  watch: {
  },
  mounted() {

  },
  methods: {
    loadTable() {
      this.loading = true
      // request({
      //         url: `http://192.168.1.32:20088/monitor/websocket/getIpInfoList`,
      //         method: 'get'
      // }).then(resp => {
      //   this.loading = false
      //   if (resp.data.code === '200' && resp.data.data) {
      //     this.list = resp.data.data
      //   } else {
      //     this.$message.error(resp.data.message || resp.data.msg)
      //   }
      // })
    }
  }
}
</script>

<style scoped>

</style>
